<template>
<uni-shadow-root class="view-new-aikucun-aikucun_index_head"><template name="aikucun_index_head">
    <view class="headerContainer">
        <view :style="'height:'+((sysWidth-20)*0.45)+'px;width:100%;'" :class="loginUser.platformUser.mendian? "header_bg_banner":"header_bg_banner_2"">
             <image v-if="loginUser.platformUser.mendian.banner && loginUser.platformUser.mendian.banner != 0" :data-name="loginUser.platformUser.mendian.name" :data-content="loginUser.platformUser.mendian.content" @click="showMendianHtml" :style="'height:'+((sysWidth-20)*0.45)+'px;width:100%;'" :src="loginUser.platformUser.mendian.banner" mode="aspectFill">
            </image>

            <image v-else-if="platformSetting.defaultShopBean.shopBanner" :data-name="loginUser.platformUser.mendian.name" :data-content="loginUser.platformUser.mendian.content" @click="showMendianHtml" :style="'height:'+((sysWidth-20)*0.45)+'px;width:100%;'" :src="platformSetting.defaultShopBean.shopBanner" mode="aspectFill">
            </image>

            <image v-else :data-name="loginUser.platformUser.mendian.name" :data-content="loginUser.platformUser.mendian.content" @click="showMendianHtml" :style="'height:'+((sysWidth-20)*0.45)+'px;width:100%;'" src="/images/icons/mendian_banner_default.jpg" mode="aspectFill">
            </image>

        </view>

        <view class="header_mendian_wrap">
            <view class="server_area_icon" v-if="loginUser.platformUser.mendian.logo && loginUser.platformUser.mendian.logo != 0">
                <image :data-url="loginUser.platformUser.mendian.logo" @click="lookBigWxCode" :src="loginUser.platformUser.mendian.logo"></image>
            </view>
            <view class="server_area_icon" v-else>
                <image src="/images/icons/logo.jpg"></image>
            </view>
            <view class="server_area" v-if="loginUser.platformUser.mendian">
                <block v-if="loginUser.platformUser.mendian.name">
                    <text class="server_area_text" :data-name="loginUser.platformUser.mendian.name" :data-content="loginUser.platformUser.mendian.content" @click="showMendianHtml">{{loginUser.platformUser.mendian.name}}</text>
                </block>
                <block v-else>
                    <text class="server_area_text"></text>
                </block>
            </view>
            <view class="header_pro_icon"><image src="/images/icons/header_pro_icon.png"></image></view>
        </view>
    </view>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'view-new/aikucun/aikucun_index_head'

Component({})

export default global['__wxComponents']['view-new/aikucun/aikucun_index_head']
</script>
<style platform="mp-weixin">
/* 头部服务商 */

.headerContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
    position: relative;
    border-radius: 0.4em;
    overflow: hidden;
}

.header_bg_banner {
    width: 100%;
}

.header_bg_banner_2 {
    width: 100%;
    padding-top: 0.4em;
}

.header_bg_banner image {
    width: 100%;
    height: 9em;
}

/* icon */

/* .server_area_icon {
    position: absolute;
    right: 0.4em;
    top: 0.4em;
    border-radius: 0.4em;
    width: 3.6em;
    height: 3.6em;
    overflow: hidden;
} */

/* .server_area_icon image {
    width: 100%;
    height: 100%;
} */

/* name */

.server_area {
    display: flex;
    flex-direction: row;
    justify-content: center;
    background: #fff;
}

/*门店的一行信息*/

.header_mendian_wrap {
    width: 100%;
    display: flex;
    height: 85rpx;
    line-height: 85rpx;
    box-sizing: border-box;
    flex-direction: row;
    justify-content: space-between;
    align-items:center;
    background: #fff;
}
.header_mendian_wrap .server_area_icon {
    width:76rpx;
    height: 76rpx;
    border-radius: 50%;
    margin-left: 2rpx;
    box-sizing: border-box;
    overflow: hidden;
}

.header_mendian_wrap .server_area_icon image {
    width: 100%;
    height: 100%;
}
.server_area_text{
    font-size: 30rpx;
    color: #373636;
    font-weight: bold;
    font-family: "黑体";
}
.header_pro_icon{
    width:61.33333rpx;
    height: 56.3333rpx;
    margin-right: 23rpx;
}
.header_pro_icon image{
    width: 100%;
    height: 100%;
}
</style>